<table>
	<% for product in Product.find(:all) -%>
	<tr>
		<% next if params[:action] == "new" && product.active == 0 -%>
		<% if @order && @order.has_item_with_product_id(product.id) -%>
		<% item = @order.line_item_with_product_id(product.id) -%>
		<td><%= item.product.name -%></td>
		<td><%= text_field "items", item.product.id, :size => 4, :value => item.quantity %></td>
		<td>$<%= text_field "item_prices", item.product.id, :size => 5, :value => item.unit_price %></td>
		<td><%= item.license_key -%>
			<% else -%>
		<td><%= product.name %></td>
		<td><%= text_field "items", product.id, :size => 4 %></td>
		<td>$<%= text_field "item_prices", product.id, :size => 5, :value => product.price %></td>
		<td></td>
		<% end -%>
	</tr>
	<% end -%>
</table>
